package com.divemotor.ventarepuestosinternet.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(schema = "TALLER", name = "TAL_MAE_VEHICULO_MODELO_FAB")
public class VehiculoModeloFabrica  implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@EmbeddedId
	private VehiculoModeloFabricaPK vehiculoModeloFabricaPK;
	
	@ManyToOne
	@JoinColumns({@JoinColumn(name = "COD_MODELO_FABRICA", referencedColumnName = "COD_MODELO_FABRICA", insertable = false, updatable = false),
				@JoinColumn(name = "COD_MARCA", referencedColumnName = "COD_MARCA", insertable = false, updatable = false),
				@JoinColumn(name = "COD_TIPO_COMPONENTE", referencedColumnName = "COD_TIPO_COMPONENTE", insertable = false, updatable = false)})
	private ModeloFabrica modeloFabrica;
	
	@ManyToOne
	@JoinColumn(name = "NUM_CHASIS", referencedColumnName = "NUM_CHASIS", insertable = false, updatable = false)
	private Vehiculo vehiculo;
	
	@Column(name = "IND_ACTIVO", length = 1)
	private String estado;

	/*** Getters & Setters ***/
	
	public VehiculoModeloFabricaPK getVehiculoModeloFabricaPK() {
		return vehiculoModeloFabricaPK;
	}

	public void setVehiculoModeloFabricaPK(
			VehiculoModeloFabricaPK vehiculoModeloFabricaPK) {
		this.vehiculoModeloFabricaPK = vehiculoModeloFabricaPK;
	}

	public ModeloFabrica getModeloFabrica() {
		return modeloFabrica;
	}

	public void setModeloFabrica(ModeloFabrica modeloFabrica) {
		this.modeloFabrica = modeloFabrica;
	}

	public Vehiculo getVehiculo() {
		return vehiculo;
	}

	public void setVehiculo(Vehiculo vehiculo) {
		this.vehiculo = vehiculo;
	}

	public String getEstado() {
		return estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}
	
}